
import random
secret = int (random.uniform(0,100))
print ("这个数是0到100之间，你能猜到吗？")
guess = 100
while guess != secret:
    if guess > secret:
        print ("小于"+str(guess))
    if guess < secret:
        print ("大于"+str(guess))
    try:
        guess = int(input("猜一个数： "))
    except:
        print ("请重新输入一个整数")
print("猜对了")